<?php
define('ICMS_P',substr(dirname(__FILE__),0,strpos(dirname(__FILE__),'include')));
define('INC_P',ICMS_P.'include'.DIRECTORY_SEPARATOR);
define('CONFIG_P',INC_P.'config'.DIRECTORY_SEPARATOR);
define('CLASS_P',INC_P.'class'.DIRECTORY_SEPARATOR);
define('LIB_P',INC_P.'lib'.DIRECTORY_SEPARATOR);
define('EXT_P',INC_P.'ext'.DIRECTORY_SEPARATOR);
define('FUNC_P',INC_P.'functioins'.DIRECTORY_SEPARATOR);
define('PLUGIN_P',ICMS_P.'plugin'.DIRECTORY_SEPARATOR);
define('BIN_P',ICMS_P.'bin'.DIRECTORY_SEPARATOR);
define('CORE_P',BIN_P.'core'.DIRECTORY_SEPARATOR);
define('MODEL_P',BIN_P.'model'.DIRECTORY_SEPARATOR);
define('DATA_P',ICMS_P.'data'.DIRECTORY_SEPARATOR);
define('LOG_P',DATA_P.'log'.DIRECTORY_SEPARATOR);
define('CACHE_P',DATA_P.'cache'.DIRECTORY_SEPARATOR);
define('TMP_P',DATA_P.'tmp'.DIRECTORY_SEPARATOR);

define('TPL_P',ICMS_P.'templates'.DIRECTORY_SEPARATOR);

set_include_path(ICMS_P);

define('UPLOAD_P',ICMS_P.'upload'.DIRECTORY_SEPARATOR);

define('DB_HOST','localhost');
define('DB_UNAME','root');
define('DB_PSW','123456');
define('DB_NAME','icms');
define('DB_PREFIX','icms_');
define('DB_PORT','3306');

define('ENV',2);    //工作环境 1-测试 2-发行

require_once LIB_P.'Util.php';
require_once LIB_P.'Db.php';
require_once INC_P.'functions.php';